<template>
    <div class="menu-wrapper">
        <div class="wrapper">
            <el-menu
                    default-active="/category"
                    ref="menu"
                    :router="true"
                    class="el-menu-my-menu"
                    mode="horizontal"
                    background-color="#545c64"
                    text-color="#fff"
                    active-text-color="#ffd04b">
                <!--<div class="img"><img src="" height="61" alt=""></div>-->
                <!--<el-menu-item index="/showbook?id">产品宣传册/Product Brochure</el-menu-item>-->
                <el-menu-item index="/category">配件手册／Accessory manual</el-menu-item>
                <!--<el-menu-item index="/easybrokenlist">易损件清单／Consumable parts list</el-menu-item>-->
                <!--<el-menu-item index="/operatemanual">操作服务手册／Operation service manual </el-menu-item>-->
                <!--<el-menu-item index="/maintain">保养／Maintain</el-menu-item>-->
                <!--<el-menu-item index="/filelist">文件列表</el-menu-item>-->
            </el-menu>
        </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                activeIndex:'',
                hostId:2
            }
        },
        methods:{
          // getStatus(urlStr){
          //     var urlStrArr = urlStr.split('/');
          //     return urlStrArr[urlStrArr.length-1]
          // }
        },
        computed: {

        },
        watch:{
            // '$route' (to,from){
            //     console.log(this.getStatus(this.$router.path));
            // }
            $route(router) {
                this.$refs.menu.activeIndex = router.path;
            }
        }
    }
</script>

<style scoped lang="scss">
    .menu-wrapper{
        user-select: none;
        width: 100%;
        .wrapper{
            position: fixed;
            top: 0;
            height: 61px;
            width: 100%;
            z-index: 999;
            .img{
                float: left;
                width: 120px;
                display: inline-block;
                vertical-align: top;
                height: 61px;
            }
        }
    }
</style>